package com.yunhe.abnormal.util;

import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class FormulaUtil {

    private static final Pattern p = Pattern.compile("var\\([^\\)]*\\)");

    public static List<String> getPointNumber(String formula) {
        Matcher matcher = p.matcher(formula);
        List<String> list = new ArrayList<>();
        while (matcher.find()) {
            String group = matcher.group();
            list.add(group.substring(4, group.length() - 1));
        }
        return list;
    }
}
